Resource Based Models for Asynchrony
نویسنده
چکیده
form. The key to our choice of morphism lies in understanding internal actions as a pair of unspeci ed synchronising actions, hidden from the environment. One may like to think of pre xing as syntactic sugar for a:(a! k a?P ): We consider what e ects specifying a name, a, for these actions, and allowing them to be seen by the environment, has; call this speci ed synchronising pair a, so one might think of a pre xing as a! k a?P: To de ne our notion of morphism on resource graphs we discuss general considerations about morphisms of labelled graphs. We think of a morphism f : G ! G0 between two labelled graphs as representing that G0 is a re nement of G. That is to say that G is more speci ed than G0. A morphism should re ne transitions of the graph in some way. We will outline what we understand by re nement. Transitions represent both local communication, moves, and capacity for interacting in a more global sense, a? and a! moves. Given a process p, we can observe the global computations it can engage in by inducing them using an environment process e situated in parallel with p. We say that e o ers an action a!, say, if e a! !, and that p accepts this o er if it synchronises with e to perform an internal reduction or computation. A transition p ! p0 of some transition system can be understood then as saying that the least o er one need make p to observe some synchronisation and reduction to p0 is ̂, where â! = a?, â? = a!, and ̂ , speci ed or not, is empty. The ordering on o ers is simply that the empty o er is less than all other o ers, which are incomparable. We will expect that any a transition can be re ned by a transition because we have information about the computation yielded by a, the name of the channel on which synchronisation occurs, that we do not have of the computation given by the action. We say that a computation is covert if we do not know the name of the synchronising channel. All computations induced by pre xes are covert. Using this de nition we say that p ! p0 f-re nes q ! q0 if p maps to q and q maps to q0 under the morphism f , such that the least o er ̂ made to p can also be accepted by q to induce a reduction to q0. If the induced computation of p is covert then the corresponding induced computation of q must also be covert. More precisely we ask that ̂ k p ! p0 implies ̂ k q ! q0 such that if we don't know the name on which p synchronises then we cannot know the name on which q synchronises. We can see that following re nements hold for transition systems, p ! p0 f-re nes f(p) ! f(p0) p a ! p0 f-re nes f(p) ! f(p0); and these give rise to a fairly unsurprising de nition [16] of morphism for asynchronous transition systems. However, we observe a peculiarity in the category of resource graphs. Edges of resource graphs are labelled with pairs, m ;S ; m0. Re nement of these edges will have to take into account the resources which are collected. To spell this out we say m ;S ; m0 f-re nes n ;S0 ; n0 if m maps to m0, and n maps to n0 such that the least o er ̂ which (covertly) reduces m to state m0 with S extra resources can also be accepted by n so that the (covert) reduction induced takes us to state n0 with the same extra resources. Under this de nition we have the following re nements m ;S ; m0 f-re nes f(m) ;S ; f(m0) m a;S+fag ; m0 f-re nes f(m) a ;S ; f(m0) m a;S ; m f-re nes f(m) ;S ; f(m0): The second re nement holds because the least o er a! made to m can be accepted by f(m) to reduce to f(m0) with S extra resources, along with the extra a resource which was unused by the a. By considering re nement to be transitive we can dispense with the idea of m a;S ; transitions for resource graphs altogether and simply use m a;S+fag ; m0 instead. The chief feature of our resource graphs morphisms then is that a morphism fromR to R0 allows us to specify in R, a name for an internal synchronisation in R0. We reinforce these intuitions by exploiting the game theoretic characterisation of bisimulation to highlight the rôle of synchronisations as speci ed and unspeci ed pairs of actions. We brie y outline the structure of the remainder. The following short section recalls the category of transition systems and describes the asynchrony axioms. In Section 3 we de ne our category of resource graphs and relate them to transition systems. Bisimulation equivalence is de ned as the span of open maps in this category and we characterise it using bisimulation like relations. The game theoretic description of this equivalence is spelled out in Section 4. We demonstrate the usefulness of our models in Section 5 by giving an enhanced notion of regularity for asynchronous systems and prove that bisimulation equivalence is polynomial time decidable over this class. Section 6 contains our conclusions. Acknowledgments: The author(s) would like to thank Catuscia Palamidessi and Guy McCusker for carefully reading a draft of this paper and suggesting many improvements. Thanks also to Colin Stirling for providing some useful pointers in the literature. This work was carried out during research visits at INRIA, Sophia-Antipolis and the University of Genova, which were funded by the EU-HCM Express network. I would sincerely like to thank Catuscia Palamidessi and Ilaria Castellani and their respective institutions for their extreme generosity and for directing me in my research. 2 Asynchronous systems We recall, from [16], the de nition of the category of transition systems, T S and describe the subcategory, AT S, of asynchronous transition systems, as characterised by Selinger. Firstly, objects of T S are transition systems, (N ; n0; L; !) where n0 is a speci ed initial node. Morphisms in T S are pairs of morphisms ( ; ) : (N ; n0; L; !)! (N 0; n00; L0; !) such that : N ! N 0 and : L * L0 is a partial function with the property that n ! n0 implies ( n ! n0 if # n = n0 otherwise. Composition of morphisms is given by pairwise (partial) function composition and the identity morphisms are simply pairs of identity functions on the respective sets. A morphism ( ; ) : T ! T 0 indicates that T 0 is a re nement of T in the sense that T is more speci ed than T 0. Observe that T may have more atomic actions than T 0 with extra transitions pertaining to these actions. Also, T may have a more speci c structure than T 0, with less non-determinism and fewer transitions. Indeed, when the component of a morphism is the identity then this morphism is simply an inclusion of T in T 0. This idea of a morphism being a re nement is examined again in the category of resource graphs. The particular sub-category AT S of T S in which we are interested is described as follows. Objects of the category are transition systems whose label set L is typed, that is L A f!; ?; g[ f g where A is some set of channel names. That is, each action is either an output, a!, an input a?, the result of a synchronisation of these a, or an internal, hidden, synchronisation, . These transition systems are subject to certain axioms, presented in Figure 2 which characterise their asynchronous behaviour [14]. Morphisms of AT S are similar to morphisms in T S except that the relabelling component is now a partial function on A. We write o a to mean either a or and de ne a! = ( a)!, a? = ( a)?, = , and a = o a. Composition and identities are de ned as in T S. n a! // n0 n00 implies 9n000 n a! // n0 n000 a! // n00 for 6= a. n a! // n0 n00 implies 9n000 n a! // n0 n00 a! // n000 for 6= a!; b n a! // a! n0 n00 implies n0 = n00 n a! // n0a? n00 implies n a! // a @ @ @ @ @ @ @ @ n0a? n00 n a! // b n0 n00 implies 9n000 n a! // b n0 b n00 a! // n000 if a 6= b and n a! // b n0 a? ~~}}}}}}}} n00 if a = b n a @ @ @ @ @ @ @ n0 implies 9n00; n000 n a! // a? a !! C C C C C C C C n00a? n000 a! // n0 Figure 2: Axioms for asynchronous transition systems 3 Resource graphs A resource graph is a graph based model for systems in which there is some notion of resource, that is, some action which is persistent and not subject to reactive behaviour. A resource's use is never precluded. The particular application we have in mind is for modelling asynchronous systems wherein the ! actions of the systems are considered as resources. Formally, a resource graph is a quintuple (M;A;m0; S0;;) where M is a set of nodes, A is some set of names, m0 is a speci ed initial node in M and S0 is a multiset of resources which are initially available. We write A for the set of all multisets over the set A. So we see that S0 2 A . The edges of the graph are given by ; M (A [ f g) A M and we write m a;S ; m0 if (m; a; S;m0) 2;. We will use + and to denote union and di erence where multiset di erence S S0 is a partial operator and is only de ned when S0 S. These operators are extended pointwise to multiset valued functions. We can now describe our category of resource graphs, in fact we describe two. The rst, RG, has morphisms similar to the category AT S in that a morphism represents re nement by introducing extra atomic actions and embedding. We use this category to relate the standard transition system models to resource graph models. The second category we de ne, RGA, contains morphisms which, following the ideas outlined in the introduction, also allow re nement by specifying on which name a synchronisation takes place. The two categories are such that RG is a lluf sub-category of RGA. The objects of RG are resource graphs. A morphism ( ; ; ') from R = (M;A;m0; S0;;) to R0 = (M0;A0;m00; S0 0;;) is a triple where is a function M!M0, is a partial function A[ f g* A0 [ f g which preserves and ' is a function M!A0 such that the following conditions are satis ed: (i) m0 = m00 (ii) S0 + 'm0 = S0 0 (iii) m ;S ; m0 implies ( m ;S0 ; m0 where S0 = S + 'm0 'm if # m = m0 and S = ;; 'm = 'm0 otherwise. The ' component of a morphism allows for a resource graph to be embedded within a larger resource graph containing additional resources available at each node. Identity morphisms in RG are of the form (Id; Id; C;) where C; denotes the constant empty multiset function. Composition is de ned by ( ; ; '); ( 0; 0; '0) = ( ; 0; ; 0; ('; 0 + ;'0)): It is straightforward enough to check that RG is indeed a category. 3.1 Relating the transition system and resource graph models We describe an adjunction AT S ar // RG ra a oo between our category of asynchronous transition systems and our simple category of resource graphs. The counit of this adjunction is in fact an isomorphism so the adjunction is a re ection. The functor ra : RG ! AT S acts on objects as follows: ra(M;A;m0; S0;;) = (M A ;A; (m0; S0); !) where ! is de ned by (m;S + fag) a! ! (m;S) (m;S) a? ! (m0; S0) if m a;S00 ; m0 and S0 = S + S00 (m;S) ! (m0; S0) if m ;S00 ; m0 and S0 = S + S00 (m;S + fag) a ! (m0; S0) if m a;S00 ; m0 and S0 = S + S00: On morphisms we have that ra( ; ; ') = ( 0; ) where 0(m;S) = ( m; S + 'm). In the other direction we need a couple of preliminary de nitions before we can describe ar. Firstly, given an asynchronous transition system we let denote the least equivalence on its nodes such that n a! ! n0 implies n n0: Secondly, we write n S! ! if there exists a (possibly in nite) sequence of transitions n a1 ! ! n1 a2! ! : : : ak! ! nk ak+1! ! : : : such that Pk ak = S. De ne Outs(n) to be the maximum S such that n S! !. We can now describe our functor ar. On objects: ar(N ; n0; L; !) = (N= ;A; [n0]; Outs(n0);;) where A is the rst projection of the label set L A f!; ?; g and ; is de ned by [n] a;S ; [n0] if n a? ! n0 [n] ;S ; [n0] if n ! n0 and S = Outs(n0) Outs(n): The reader is invited to check that the asynchrony axioms guarantee that Outs(n) Outs(n0), thus ensuring that this does de ne a resource graph. On morphisms we have that ar( ; ) = ([ ]; ; ( ;Outs( ) Outs( ); )) where [ ][n] = [ n] and the third component is applied to any representative of the equivalence class. This is a well-de ned resource graph morphism because of the asynchrony axioms. Theorem 3.1 ar is left adjoint to ra, moreover the counit, ra; ar " ! Id, of the adjunction is an isomorphism. Proof: The counit of the adjunction is ("; Id; C;) where "([(m;S)]) = m. This is easily seen to be natural and universal and it has an inverse (Id; " 1; C;) where " 1(m) = [(m; ;)]. Dually, the unit of the adjunction is (Id; [ ] Outs( )). 2 We see that the unit of the adjunction does not necessarily have an inverse. This is because in mapping our resource graph to a transition system we consider all con gurations of nodes and multisets. This includes many con gurations which don't necessarily arise during computation. Thus, if we restrict our attention to those con gurations which are reachable, in some sense, then we can nd an inverse for our unit. To this end, de ne the set of reachable con gurations of a resource graph to be Reach(m0; S0) where Reach is de ned inductively as follows: Reach0(m;S) = ; Reachn+1(m;S) = f(m;S0) j S0 Sg [ S m ;S00 ; m0 Reachn(m0; S00 + S): Let Reach(m;S) = S n 0Reachn(m;S). We immediately note that all reachable con gurations of the resource graph ar(T ) are of the form ([n]; Outs(n)) for some n 2 T . Thus, by replacing the set of all con gurations M A by just the reachable ones, Reach(m0; S0), we can obtain an equivalence between the sub-categories of AT S and RG whose graphs only contain reachable states. 3.2 A larger category of resource graphs We now consider a slightly more general category RGA of which RG is a lluf sub-category, that is, the objects of RGA are exactly the objects of RG. The extension lies in the notion of morphism. We relax the de nition of morphism of resource graphs in accordance with the motivation outlined in the introduction. The generalisation is tantamount to allowing a action of the target graph to be speci ed as a synchronisation on a particular name. We argued that a synchronisation on channel a is a re nement of the action a? where an extra a! resource is made available. The new notion of morphism utilises this observation. A morphism of RGA is a triple ( ; ; ') as above, however we ask that the following conditions be satis ed instead: (i) m0 = m00 as above (ii) S0 + 'm0 = S0 0 as above (iii) m ;S ; m0 implies m ;S0 ; m0 (iv) m a;S ; m0 implies 8><>: m a;S0 ; m0 or m ;S00 ; m0 if a # m = m0 and S = ;; 'm = 'm0 otherwise where S0 = S +'m0 'm and S00 = ( (S fag))+'m0 'm: Identities and composition are de ned as in RG and RGA is also seen to be a category. 3.3 Bisimulation on resource graphs We propose a de nition of bisimulation, suitable for resource graphs, in abstract form. Namely, we use the machinery of open maps, [7], to declare two resource graphs with label the same label set A, bisimilar if there exists a span of open maps between them in the sub-category RGAo of RGA. All of this sub-category's objects have label set A and all morphisms have the identity as the component. Furthermore, edges in the graphs of RGAo enjoy the following determinacy conditions: m ;S ; m0 and m ;S0 ; m0 implies S = S0 m a;S+fag ; m0 and m ;S0 ; m0 implies S = S0 One should note that this determinacy condition is a technical restriction and can easily be enforced in an arbitrary resource graph by simply sending o ending pairs of transitions to di erent targets. We de ne paths in RGAo to be resource graphs of the form m0 1;S1 ; m1 2;S2 ; k;Sk ; mk with initial node m0 and initial resources S0. Recall that we call a morphism f : R ! R0 open if for all paths P;Q such that the following commutes P // g Rf Q // R0 then we have a morphism h : Q! R such that P // g Rf Q // h >> ~ ~ ~ ~ ~ ~ ~ ~ R0 (we use ,! to denote inclusion morphisms). De ne bisimulation then as R o R0 i there exists a R̂ f g ? ? ? ? ? ? ? ? R R0 with f; g open. It is easy to see that o is both re exive and symmetric, but to prove that it is transitive it is su cient to check that RGAo has pullbacks [7]. Proposition 3.2 RGAo has pullbacks, which makes o an equivalence relation. 3.4 Characterising o The abstract de nition of bisimulation using open maps, while being quite general, is not particularly illuminating. For this reason it is natural to seek simpler characterisations of this relation. To this end we consider the following class of relations. For resource graphs (M;A;m0; S0;;) and (M0;A;m00; S0 0;;) such that S0 = S0 0 we call a symmetric relation B onM M0 a resource graph bisimulation if (m0;m00) 2 B and whenever (m1;m2) 2 B then if m1 ;S ; m01 then there exists a m02 such that m2 ;S ; m02 with (m01;m02) 2 B if m1 a;S ; m01 then there exists a m02 such that m2 a;S ; m02 or m2 ;S0 ; m02 with (m01;m02) 2 B, and S0 + fag = S. We write R rg R0 if there exists a resource graph bisimulation relating R and R0. Theorem 3.3 rg and o coincide. 3.5 A model for asynchronous CCS We recall the notion of asynchronous bisimulation, as, as proposed by Amadio, Castellani, Sangiorgi [1] (albeit for the -calculus and without a actions) and show that the functor ar and the equivalence o provide a fully abstract interpretation for as. A symmetric relation B on asynchronous CCS processes is called an asynchronous bisimulation if whenever (p; q) 2 B we have if p a! ! p0 then there exists a q0 such that q a! ! q0 with (p0; q0) 2 B. if p a ! p0 then there exists a q0 such that q o a ! q0 with (p0; q0) 2 B. if p ! p0 then there exists a q0 such that q ! q0 with (p0; q0) 2 B. if p a? ! p0 then there exists a q0 such that q a? ! q0 with (p0; q0) 2 B or q o a ! q0 with (p0; a! k q0) 2 B. Recall that o a means either a or . The largest such relation will be denoted as. By considering asynchronous processes as asynchronous transition systems, via operational semantics, we can interpret processes as resource graphs by means of the functor ar. This interpretation is fully abstract for as. Theorem 3.4 For asynchronous processes p and q, p as q if and only if ar(p) o ar(q). Proof: Show p as q i ar(p) rg ar(q) and use Theorem 3.3. 2 The reader should note that as is an atypical notion of bisimulation for transitions systems and di ers from the one in [1] in that actions must be matched solely by actions, thereby disallowing the possibility of matching with a a action. A more standard notion of equivalence is gained by replacing the third matching condition above with if p ! p0 then there exists a q0 such that q o a ! q0 with (p0; q0) 2 B: Let +as denote the equivalence yielded by this modi cation. This situation is of course rather unsatisfactory in general, but we can at least console ourselves with the fact that as coincides with the more standard +as on the class of transition systems for which Outs is always nite at each node. In particular as and +as coincide on our class of regular processes in Section 5. Proposition 3.5 as q and +as coincide on the class of transition systems such that Outs is nite at each node. Proof: One inclusion is immediate. For the reverse inclusion we need to show that +as is an asynchronous bisimulation. The only way that +as may fail to be an asynchronous bisimulation is if, given p +as q we have p ! p0 being matched by q a ! q0 for some q0. We show that there must be a matching transition in this case. Now, we know that Outs(p) is nite and that each of these output transitions from p must be matched by q. Therefore there exist p0; q0 such that p a1 ! ! an! ! p0 and q a1! ! an ! ! q0; Outs(p0) = Outs(q0) = ; and p0 +as q0. We know that asynchrony ensures p0 ! p00 for some p00 and that this must be matched by q0 ! q0 0 because q0 can no longer perform a a transition as Outs(q0) = ;. Again, by asynchrony we know that q ! q00 for some q00. It is easy to check that p0 +as q00 follows from p00 +as q0 0. 2 4 Game theoretic description of o We extend our characterisation of asynchronous bisimulation further by showing how the notion can be captured as winning strategies of a suitable game. The use of games to characterise bisimulation has provided a conceptually powerful tool for understanding bisimulation as an equivalence which captures interaction [15]. In our setting the game characterisation helps us understand the rôle of as a pair of unspeci ed, complementary actions. We give a general de nition of what we mean by a game and instantiate this de nition later to give us our appropriate equivalence. So, a game , is a quadruple (C; c0; ; ) where C is a set of con gurations with a speci ed initial con guration c0. The relation C C comprises the rules of the game. This relation tells us how play may continue from one move to the next. The function : C ! fO;Pg labels moves as either Opponent or Player moves according to who is next to play we require c0 = O and c 6= c0 whenever c c0. A play of a game is a sequence c0 c1 c2 ck We write P ( ) for the set of all plays and abuse notation by writing cs to mean the label of the last move of cs (if it exists). A play, cs, is called maximal if it is in nite or cannot be extended, that is there is no move c such that cs c. We say that O wins the nite play cs if cs = P and cs is maximal. Dually, we say that P wins a (possibly) in nite play if cs = O and the play is maximal. A strategy for O is a partial function from Pos(O) = fcs j cs = Og to M (P ) = fc j c = Pg. We can de ne a strategy for P similarly. Given an O-strategy o, we write P ( o) for fcs 2 P ( ) j 8cs0 < cs cs0 = O implies (cs0 o(cs0)) < csg where < is the pre x ordering on plays. We say that the strategy o is winning if all maximal plays of P ( o) are nite and labelled P . Dually, we can de ne P ( p) for player strategies p and say that p is winning if all maximal plays of P ( p) are in nite or labelled O. 4.1 The asynchronous bisimulation game We can now describe the game which characterises asynchronous bisimulation simply by describing the con gurations of the game and the rules. Before formally de ning these however, we give an intuitive explanation of the game. Imagine a table containing a pile of cards, labelled with names from some set A, arranged in such a way as to model a resource graph. In addition to this pile of cards there is a hand of cards kept as a reserve. So, if the resource graph has a m a;S ; m0 transition, this means there will be an a card available for play from the pile. If it is played then the cards in S must be picked up and kept in the reserve hand and the pile of cards will now re ect state m0. If the resource graph has a m ;S ; m0 transition then the player has a blank card available. If she wishes to play this blank card she must pencil in a name, play Left Rules: If d 2 fL;Eg Table: ((m;S); (m0; S0); zs; d) ((m00; S + S00); (m0; S0); a?zs; d) if m a;S00 ; m00 and d = L implies hd(zs) = a? Reserve: ((m;S); (m0; S0); zs; d) ((m;S fag); (m0; S0); a!zs; d) if d = L implies hd(zs) = a! Blank: ((m;S); (m0; S0); zs; d) ((m00; S + S00 + fag); (m0; S0); a?zs; d) if m ;S00 ; m00 and d = L implies hd(zs) = a! Right Rules: If d 2 fR;Eg Table: ((m;S); (m0; S0); zs; d) ((m;S); (m00; S0 + S00); a?zs; d) if m0 a;S00 ; m00 and d = R implies hd(zs) = a? Reserve: ((m;S); (m0; S0); zs; d) ((m;S); (m0; S0 fag); a!zs; d) if d = R implies hd(zs) = a! Blank: ((m;S); (m0; S0); zs; d) ((m;S); (m00; S0 + S00 + fag); a?zs; d) if m0 ;S00 ; m00 and d = R implies hd(zs) = a! where L = E, E = R and R = E, E = L. Figure 3: Rules for asynchronous bisimulation game it, pick up the cards in S for the reserve hand and in addition to these must ll in a blank card with the same name and place it in the reserve hand. A card from the reserve hand may be played irrespective of the pile of cards representing the resource graph. A con guration of our game is a pair of the above tables, that is, two tables with a pile of cards and a separate reserve hand each. At each turn, Opponent can play a card from either table and Player must play the same card from the other table. The only extra condition is that a card from a reserve hand is played by Player if and only if Opponent has played her card from a reserve hand. Opponent always starts and play continues until one of the players becomes stuck. Opponent wins if Player becomes stuck and Player wins otherwise. To formalise this, given two resource graphs R = (M;A;m0; S0;;) and R0 = (M0;A;m00; S0 0;;) we describe the game A(R;R0) as the quadruple (C; c0; ; ) where C is the set of all ((m;S); (m0; S0); zs; d) such that m 2 M, m0 2 M0, S; S0 2 A , zs 2 (A f!; ?g) and d 2 fL;R;Eg. Clearly, the nodes of the resource graphs represents the pile of cards on the tables and the respective multisets represent the reserve hands. We use the list zs to represent the cards that have already been played and d merely to indicate which table must be played from next, the Left, Right or Either. The cards in zs are tagged with a ! or a ? to indicate whether the card was played from a table or a reserve hand. It should be no surprise then that the initial con guration is c0 = ((m0; S0); (m00; S0 0); "; E): We can label moves by using the last component so that c = P if d 2 fL;Rg and c = O if d = E. The rules for the game are given in Figure 3 and fall into three pairs of symmetric rules which describe the moves of playing a card from the table, the reserve hand and playing a blank card by penciling in a name. We write R R0 if there exists a winning Player strategy according to the rules of A(R;R0). It is simple enough to see that this is indeed an equivalence relation, in fact this is exactly resource graph bisimulation. Theorem 4.1 rg coincides with . Proof: It is easy to see that rg . For the reverse inclusion, given a winning strategy, it is su cient to build a bisimulation relation. This is constructed as pairs of nodes which occur in the con gurations of plays according to the winning strategy. We take exactly those pairs which occur after Player moves. To see that this will be a resource graph bisimulation we note that transitions must be matched by transitions | otherwise Opponent could win by choosing a fresh name to pencil in on the blank card given by the action. Player couldn't hope to match this unless he had also had a move available. To see that the resources being collected by each graph must be identical we note that, otherwise, Opponent could win by simply playing a move from the larger of the two reserve hands. 2 5 Regular asynchronous processes We hinted earlier that our new model would lend itself to providing a notion of regular process for asynchronous calculi whereby regular terms have nite graphs. By nite graph we mean nitely many nodes, nitely many transitions and each resource multiset is nite. So far we have interpreted asynchronous CCS in RG indirectly by rst giving an AT S semantics and then applying the functor ar. This approach su ces for modelling our language; indeed, to establish a regular term/ nite resource graph relationship one need only show that the equivalence relation used by the functor ar has nite index on transition systems generated by regular terms. However, this method is slightly unsatisfactory as it involves building potentially in nite graphs and collapsing them. What would be more pleasing is a direct interpretation of aCCS in RGA by which regular terms immediately receive nite graph models. Furthermore, we should require that this interpretation be compositional and coincides (up to equivalence) with the indirect interpretation. In fact, for our purposes it su ces to interpret what we will refer to as (asynchronously) regular terms of aCCS. These can be characterised by the following grammar p := nil j X j a! k p j p k a! jXI i:pi j rec X:p where I is a nite indexing set, X is drawn from some set of variables V ar, the i are either a? or and all recursions are guarded. We adopt the conventional notions of free and bound variables here. To interpret recursion, we take the approach of [9] and augment resource graphs with an extra component. This new component, is a relation on nodes of the graph and the ambient set of recursion variables, V ar. We say that a variable, X, is unguarded at a node m if m X and we call a resource graph closed if is the empty relation. We make use of the following operators on resource graphs: rstly, we note that resource graphs have a tensor product structure, , with unit I. Given graphs R = (M;A;m0; S0;;; ) and R0 = (M0;A0;m00; S0 0;;; 0) this is de ned in the obvious way as R R0 = (M M0;A+A0; (m0;m00); S0 + S0 0;; ; [ 0) where (m;n) ;S ; (m0; n) if m ;S ; m0 (m;n) ;S ; (m;n0) if n ;S ; n0: The tensor unit is I = (f g ; ;; ; ;; ;; ;). The de nition of easily lifts to morphisms to become a bifunctor on RGA. We interpret an output action a! as the resource graph (f g ; fag ; ; fag ; ;; ;) and we will refer to this graph simply by a!. Similarly, use the name X to refer to the resource graph (f g ; ;; ; ;; ;; f( ; X)g): Another useful operation is that of the lifted sum of resource graphs. Given an I indexed set of graphs Ri, an I indexed set of actions i, and a multiset S, we de ne X( i; Ri) = (([Mi) + f g ;[Ai [ f i j i 6= g ; ; ;;;?;[ i) where ;?= Si ;i [n i;S0i ; m0io. Finally, we describe how we interpret recursion over resource graphs. Given a graph R, we de ne rec X:R to be the graph (M;A;m0; S0;;+; +) where + is just with all pairs (m;X) removed. ;+ is de ned in two steps. Firstly, de ne m ;S ;1 m0 if m ;S ; m0 and m0 6 X m ;S+S0 ; 1 m0 if m ;S ; m0 and m0 X: Then, let m ;S ;+ m0 if m0 ;S ; 1 m0 and m X, or m ;S ;1 m0. The informed reader will notice that this de nition of recursion di ers slightly from that in [9] and is not su cient to model general recursion, but we exploit the property that regular terms never have more than one unguarded variable to give a simple de nition. These operators now allow us to interpret regular terms of aCCS in the desired manner: [[ nil ]] = I [[X]] = X [[a! k p]] = a! [[p]] [[p k a!]] = [[p]] a! [[P i:pi]] = P( i; [[pi]]) [[recX:p]] = rec X:[[p]]: Let p̂ denote the transition system that would model p using the standard SOS semantics of CCS. Proposition 5.1 (i) The resource graph [[p]] is nite for any regular term p. (ii) If p is closed then [[p]] is a closed graph. (iii) Every nite closed graph is rg equivalent to [[p]] for some regular p. (iv) ar(p̂) rg [[p]]. This rmly establishes the correspondence between asynchronously regular terms and nite resource graphs. 5.1 Deciding bisimulation equivalenceTo see the usefulness of having nite models we need only look at the problem of deciding bisimulationequivalence. It is evident that as will be a decidable equivalence over asynchronously regular termsdue to work on in nite state transition systems [3]. Speci cally, asynchronously regular terms are asmall subclass of BPP and bisimulation equivalence is decidable over this class of processes. What isnot clear however is the complexity of this decision procedure. The proofs that bisimulation equivalenceis decidable over BPP do not provide any upper bounds for the decision procedure [5, 11]. The classof asynchronously regular processes are much simpler than BPP and therefore allow us to nd suchbounds. In fact, because our models for this class are nite then standard techniques apply [8, 12].Theorem 5.2 Asynchronous bisimulation equivalence, as, is decidable in polynomial time for (asyn-chronously) regular processes.Proof: In order to decide P as Q, by Proposition 5.1, Proposition 3.5 and Theorem 3.4 it is su cientto check [[P ]] rg [[Q]]. We know by Proposition 5.1, (i) that these resource graphs are nite. The decisionprocedure now follows by rst checking the initial resource sets of each graphs, and then solving thepartition re nement problem of [12] for the nite set of relationsmE;Sm0 if m ;S; m0mEa;Sm0 if m a;S; m0mE+a;Sm0 if m a;S+fag; m0 or m ;S; m0:These relations are nite in number because we know that only nitely many names are used and onlynitely many di erent S appear on the edges of our graphs.2We have now provided a notion of regularity for asynchronous processes which allows much moreexpressivity than the standard notion of regularity for CCS. We have also shown that a suitable notionof bisimulation equivalence is polynomial time decidable over this class of processes. Unfortunatelythough, this enhanced notion of regularity is not as robust as we would like. In particular, it is the casethat one can form parallel compositions and restrictions of CCS regular terms and stay within the classof regular processes [9, 10]. Sadly, this is not the case in the present work. Whilst parallel compositionpreserves niteness of the models of regular terms, the restriction of such graphs does not. In fact,using the familiar argument of reducing bisimulation equivalence to the halting problem for two-counterMinsky Machines [11] we can show that allowing restriction of regular terms, unsurprisingly, entailsundecidability of our equivalence.We conclude this section by brie y mentioning that the direct interpretation of asynchronouslyregular CCS terms as resource graphs can be extended to whole of aCCS in such a way as to ensurethat Proposition 5.1, (iv) still holds. This extension is non-trivial however and involves de ning boththe recursion and restriction operators on graphs as the least xed point of certain functionals so thatthe resulting resource graphs may become in nite.6 ConclusionWe have presented a novel approach to modelling asynchronous systems. The chief feature of these newmodels is the treatment of asynchronous transmission as the use of resources. Resource graphs yield adirect presentation of asynchronous behaviour, without recourse to various commutativity axioms. Theyalso provide a compact representation of many in nite state systems, thereby allowing e ective proce-dures for deciding bisimilarity. We discovered that the somewhat unorthodox notion of asynchronousbisimilarity arises naturally in the category of resource graphs and provided insightful characterisationsof this equivalence.The present work is concerned with synchronising processes rather than communicating processes,that is, no information is transmitted by output actions. Therefore a treatment of asynchrony in the-calculus is beyond the scope of resource graphs as presented. An issue worth further investigation isa generalisation of the resource graph model which could cater for name passing and dynamic scopingas can be found in the -calculus. References[1] R. Amadio, I. Castellani, and D. Sangiorgi. On bisimulations for the asynchronous -calculus.In U. Montanari and V.Sassone, editors, Proceedings CONCUR 96, Pisa, volume 1119 of LectureNotes in Computer Science, pages 147{162. Springer-Verlag, 1996.[2] G. Boudol. Asynchrony and the -calculus. Technical Report 1702, INRIA, Sophia-Antipolis, 1991.[3] S. Christensen, Y. Hirsh eld, and F. Moller. Bisimulation equivalence is decidable for basic parallelprocesses. In E. Best, editor, Proceedings CONCUR 93, Hildesheim, volume 715 of Lecture Notesin Computer Science, pages 143{157. Springer-Verlag, 1993.[4] C. Fournet and G. Gonthier. The re exive CHAM and the join-calculus. In Proc. ACM-POPL,1996.[5] Y. Hirshfeld, M. Jerrum, and F. Moller. A polynomial algorithm for deciding bisimulation equiv-alence of normed basic parallel processes. In Proc. Mathematical Structures in Computer Science,1996.[6] K. Honda and M. Tokoro. An object calculus for asynchronous communication. In Proc. ECOOP91, Geneve, 1991.[7] A. Joyal, M. Nielsen, and G. Winskel. Bisimulation and open maps. In Proceedings 8th AnnualSymposium on Logic in Computer Science, pages 418{427. IEEE Computer Society Press, 1993.[8] P.C. Kanellakis and S.A. Smolka. CCS expressions, nite state processes, and three problems ofequivalence. Information and Computation, 86:43{68, 1990.[9] R. Milner. A complete inference system for a class of regular behaviours. Journal of Computer andSystem Sciences, 28:439{466, 1984.[10] R. Milner. Communication and Concurrency. Prentice-Hall International, Englewood Cli s, 1989.[11] F. Moller. In nite results. In U. Montanari and V.Sassone, editors, Proceedings CONCUR 96, Pisa,volume 1119 of Lecture Notes in Computer Science, pages 195{216. Springer-Verlag, 1996.[12] R. Paige and R. Tarjan. Three partition re nement algorithms. SIAM Journal on Computing,16(6):973{989, 1987.[13] B. Pierce and D. Turner. Pict: A programming language based on the -calculus, 1996. Univeristyof Cambridge.[14] P. Selinger. First-order axioms for asynchrony. In M. Bednarczyk, editor, Proceedings CONCUR97, Warsaw, volume 1243 of Lecture Notes in Computer Science, pages 376{390. Springer-Verlag,1997.[15] C. Stirling. Bisimulation, model checking and other games, 1997. Notes for Math t InstructionalMeeting on Games and Computation, University of Edinburgh.[16] G. Winskel and M. Nielsen. Models for concurrency. In S. Abramsky, Dov M. Gabbay, andT.S.E. Maibaum, editors, Handbook of Logic in Computer Science, Volume 4, pages 1{148. OxfordUniversity Press, 1995.
منابع مشابه
Models and Resource Metrics for Parallel and Distributed Computationt
This paper presents a framework of using resource metrics to characterize the various models of parallel computation. Our framework reflects the approach of recent models to abstract architectural details into several generic parameters, which we call resource metrics. We examine the different resource metrics chosen by different parallel models, categorizing the models into four classes: the b...
متن کاملModels and Resource Metrics for Parallel and Distributed Computation
This paper presents a framework of using resource metrics to characterize the various models of parallel computation. Our framework reeects the approach of recent models to abstract architectural details into several generic parameters, which we call resource metrics. We examine the diierent resource metrics chosen by diierent parallel models, categorizing the models into four classes: the basi...
متن کاملA Bi-level Formulation for Centralized Resource Allocation DEA Models
In this paper, the common centralized DEA models are extended to the bi-level centralized resource allocation (CRA) models based on revenue efficiency. Based on the Karush–Kuhn–Tucker (KKT) conditions, the bi-level CRA model is reduced to a one-level mathematical program subject to complementarity constraints (MPCC). A recurrent neural network is developed for solving this one-level mathematica...
متن کاملCoexistence of cycling and dispersing consumer species: Armstrong and McGehee in space.
Two competing consumer species may coexist using a single homogeneous resource when the more efficient consumer--the one having the lowest equilibrium resource density--has a more nonlinear functional response that generates consumer-resource cycles. We extend this model of nonequilibrium coexistence, as proposed by Armstrong and McGehee, by putting the interaction into a spatial context using ...
متن کاملA New Bi-Objective Model for a Multi-Mode Resource-Constrained Project Scheduling Problem with Discounted Cash Flows and four Payment Models
The aim of a multi-mode resource-constrained project scheduling problem (MRCPSP) is to assign resource(s) with the restricted capacity to an execution mode of activities by considering relationship constraints, to achieve pre-determined objective(s). These goals vary with managers or decision makers of any organization who should determine suitable objective(s) considering organization strategi...
متن کاملManaging Contention and Timing Constraints
Previous work in real-time database management systems ( R T D B M S ) has primarily based o n simulation. This paper discusses how current real-time technology has been applied t o architect a n actual RTD B M S o n a real-time microkernel operating system. A real R T D B M S m u s t confront m a n y practical issues which simulations typically ignore: race conditions, concurrency, and asynchr...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998